PHP2Shell Explained: What WordPress Site Owners Need to Do Right Now

Written By: on October 22, 2026
Listen to this article 14 min

Audio version

PHP2Shell warning graphic reading Update Your PHP, Protect your WordPress website, with a glowing shield carrying the PHP and WordPress logos blocking red virus attacks on a server.

PHP2Shell is the name for two critical PHP flaws that let an attacker take over a web server without a password. If your website runs on WordPress, it runs on PHP, so this one is about you.

On October 21, 2026, the PHP project shipped emergency fixes. Within hours, CISA, the FBI, and cyber agencies in the UK, EU, and Canada urged owners to patch. Some even advised taking unpatched servers offline, and attackers are now exploiting it in the wild.

The short answer: update PHP to 8.5.12, 8.4.27, 8.3.36, or 8.2.35 today. Below is the plain-English version of what PHP2Shell is, why it matters for a small business site, and exactly how to check yours.

What is PHP2Shell?

PHP2Shell is the nickname for two vulnerabilities in PHP itself, tracked as CVE-2026-109618 and CVE-2026-109619. PHP rates both 9.2 out of 10 on the CVSS v4 scale, which puts them firmly in critical territory.

Importantly, these are not plugin or theme bugs. Instead, they sit in the language that runs underneath WordPress, WooCommerce, and much of the web. According to the official PHP security advisory, every PHP installation serving web requests is at risk.

The two flaws in plain English

  • CVE-2026-109618 (out-of-memory corruption): when a request pushes PHP to its memory limit at exactly the wrong moment, PHP can leave half-built data behind and later trust it.
  • CVE-2026-109619 (stale global state): data from one visitor’s request can outlive its memory, and the next request on the same worker can stumble over it.

In other words, a carefully crafted web request can confuse PHP’s memory. An attacker can then turn that confusion into running their own commands on your server. The attacker needs no login, no plugin, and no click.

Why every WordPress site is affected by PHP2Shell

WordPress runs on PHP, so every WordPress site is in scope. It does not matter how current your plugins are. In fact, WordPress.org has confirmed that no WordPress update is coming for this, because the fix lives at the server level.

Furthermore, the affected list covers nearly every way servers run PHP: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. PHP considers mod_php the highest risk, since the attack can fire before any of your site’s code runs. Google Cloud puts the vulnerable range at every PHP version from 5.4 up to the October 21 fixes.

For a small business, a server takeover is not an abstract risk. For example, it can mean:

  • Spam pages or malware injected into your site, which drags down your Google rankings
  • Stolen form submissions, customer data, or WooCommerce order details
  • Your server used to attack other sites, which can get your domain blacklisted
  • Days of downtime and a rebuild from backups

That last point is why a tested backup matters so much. If you have not checked yours lately, take a few minutes to review your WordPress backup strategy before you need it.

What CISA, the FBI, and other agencies are saying

Government cyber agencies moved unusually fast on PHP2Shell. That alone tells you how seriously the security world is taking it.

  • CISA, the US Cybersecurity and Infrastructure Security Agency, urged organizations to patch immediately and to put internet-facing systems first. Its official alert adds that anyone who cannot update right away, or who still runs PHP 8.1 or older, should take PHP systems offline until patched.
  • The FBI Cyber Division warned the flaws could expose sensitive data and networks. If you find signs of compromise, it asks you to isolate the system, preserve your logs, and report it at ic3.gov.
  • The UK National Cyber Security Centre told organizations to treat every PHP install as affected and to hunt for backdoors if they cannot patch quickly.
  • CERT-EU and Canada’s Cyber Centre issued their own critical advisories as well.

So when the agencies that guard federal networks say to pull servers offline, a small business should not wait until next week.

Is PHP2Shell being exploited? Yes

Yes, and the picture changed fast. CISA said it had not observed exploitation when it published its alert on October 21. Since then, Tenable’s updated FAQ quotes Amazon Threat Intelligence: PHP2Shell is now being broadly exploited in the wild.

Meanwhile, the timeline keeps moving. Amazon logged its first attempt on October 17, before public disclosure. The CVE numbers then leaked on October 20, so PHP moved its release up by a day. In addition, Canada’s Cyber Centre reports that proof-of-concept code is available, and Rapid7 says other researchers are reproducing the work.

In short, treat this as an active attack, not a future one. Security researcher Kevin Beaumont called it one of the biggest vulnerabilities in years and predicted a mass of incidents.

How to check your PHP version in WordPress

Before you can fix anything, you need to know what you are running. Fortunately, WordPress shows you in about 30 seconds.

  1. Log in to your WordPress dashboard.
  2. Go to Tools, then Site Health, then the Info tab.
  3. Open the Server section and find the PHP version line.
  4. Compare that number to the fixed versions in the next section.

Alternatively, most hosting control panels show the PHP version on the main dashboard. If you have server access, running php -v at the command line works too.

How to fix PHP2Shell: update PHP today

The only complete fix is updating PHP. Specifically, move to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35, matching the branch you already run, or anything newer.

Linux distributions and long-term support vendors received the patches early, so updated packages should be available now or soon. Check with your vendor. Notably, PHP 8.2 reaches end of life on December 31, 2026, so plan a move to 8.3 or newer soon after.

If your host manages PHP

Most small business sites sit on managed hosting, where the host controls PHP. In that case, open a support ticket today and ask two direct questions. After all, keeping server software current is part of what a web hosting service does for you. Has the host patched the server to a fixed PHP version, and when? Then get the answer in writing.

Also, sites behind Cloudflare received initial firewall rules for the known attack paths. That buys time, much like good HTTP security headers do, but it is not a patch.

If you manage your own server

If you run your own VPS or dedicated server, update PHP through your package manager, then restart every PHP worker. For example, PHP-FPM keeps old code in memory until it restarts, so an update without a restart leaves you exposed.

One more warning comes from PHP itself. If you rely on the volunteer-run remirepo.net packages, switch to your distribution’s packages or build from source, because that repo did not have updates on release day.

What to do if you are on PHP 8.1 or older

PHP 8.1 and older no longer get official updates. As a result, there is no simple PHP2Shell patch for them. These are also the sites CISA says to take offline if you cannot fix them quickly.

Given the severity, the PHP security team also published source backports for PHP 7.4, 8.0, and 8.1. Those help people who build PHP from source. In addition, some Linux vendors offer backported fixes, so check with yours.

For most business sites, though, the real fix is upgrading to a supported PHP version. Older plugins and themes may break on newer PHP, so test on a staging copy first. If you have been putting off updates, here is why small, incremental updates hurt far less than one big jump like this.

Temporary mitigations if you cannot update today

If an update truly cannot happen today, PHP published some settings that reduce PHP2Shell exposure. To be clear, they do not make a server safe. Instead, they only block specific known attack paths.

  • Set session.upload_progress.enabled = 0 in php.ini or the FPM pool config, then restart every worker.
  • Lower post_max_size to 8M, or 32M if the site needs file uploads, and keep upload_max_filesize below it.
  • On PHP 8.5, also set fatal_error_backtraces = 0 and restart.
  • Apply these at the server or pool level, not through ini_set() or a .user.ini file, because those load too late.

After that, schedule the real update for the same week. Mitigations are a bridge, not a destination.

After you patch: check for signs of compromise

Patching closes the door, but it does not tell you whether someone already walked through it. So once you update PHP, spend a few minutes looking for trouble.

  • Review server logs for PHP worker processes that launched shells or downloaded tools, a pattern security researchers flag.
  • Watch for unexplained PHP worker restarts, a warning sign Patchstack lists, citing Wiz Research.
  • Scan the site for unfamiliar files, new admin users, and injected spam links.
  • Test your exposure with php2shell-scanner, a free open-source tool from Searchlight Cyber.

If something looks wrong, isolate the server and keep the logs before you clean anything. My guide to WordPress virus and malware prevention covers the cleanup steps, and these WordPress hardening tips help close the other doors.

The real lesson of PHP2Shell: someone has to own the server

Here is the part most site owners miss. A WordPress site has layers, and PHP2Shell lives in the one nobody looks at, the server. Plugin updates would not have caught it, and neither would a security plugin.

That is why I treat server-level patching as part of ongoing website maintenance and security, not an optional extra. When a critical PHP release lands, someone should already be checking every site the same day.

Not sure whether your server is patched? Our managed web hosting keeps PHP current for you. Or simply send me a message, and I will check your PHP version and tell you exactly where you stand.

Frequently asked questions about PHP2Shell

What is PHP2Shell?

PHP2Shell is the nickname for two critical vulnerabilities in the PHP language, CVE-2026-109618 and CVE-2026-109619. PHP rates both 9.2 out of 10, and they can let an attacker run their own code on a web server without logging in. Because they live in PHP itself, they affect WordPress and most other PHP websites, regardless of which plugins or themes you run.

Does PHP2Shell affect WordPress sites?

Yes. WordPress runs on PHP, so every WordPress site is in scope until its server runs a fixed PHP version. WordPress.org has confirmed that no WordPress update is planned, because the fix has to happen at the server level. Your plugins and theme can be fully up to date and the site stays exposed until someone patches PHP itself.

Which PHP versions fix PHP2Shell?

The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, all published on October 21, 2026. Update to the one that matches the branch you already run, or anything newer. PHP 8.1 and older no longer receive official updates, so those sites need a backported fix from a vendor or an upgrade to a supported version.

How do I check which PHP version my WordPress site uses?

In your WordPress dashboard, go to Tools, then Site Health, then the Info tab, and open the Server section. You will see the PHP version there. Most hosting control panels also show it on the main dashboard. If you have command line access to the server, running php -v gives you the same answer in a second.

Will a WordPress or plugin update fix PHP2Shell?

No. PHP2Shell is a flaw in PHP, the language WordPress runs on, not in WordPress core, a plugin, or a theme. Clicking update in the WordPress dashboard will not change your PHP version. Your web host, or whoever manages your server, has to apply the fix.

Is PHP2Shell being actively exploited?

Yes. CISA said it had not observed exploitation when it published its alert on October 21, 2026. Since then, Amazon Threat Intelligence has reported that PHP2Shell is being broadly exploited in the wild, after logging a first attempt on October 17. Canada’s Cyber Centre also reports that proof-of-concept code is available, so patch now.

What did CISA say about PHP2Shell?

CISA urged organizations to patch PHP immediately, starting with internet-facing systems. It also said that anyone who cannot update right away, or who still runs PHP 8.1 or older, should take PHP-based systems offline until they can patch them. CISA published the alert on October 21, 2026, the same day PHP released the fixed versions.

What should I do if my site runs PHP 8.1 or older?

Plan an upgrade to a supported PHP version as soon as possible, ideally PHP 8.3 or newer. Test the site on a staging copy first, since older plugins and themes can break on newer PHP. Until you upgrade, check whether your Linux vendor offers a backported fix, and consider taking the site offline as CISA advises.

Can a firewall like Cloudflare protect me from PHP2Shell?

Partly. Cloudflare deployed an initial set of firewall rules for the known attack paths, and many hosts are adding similar rules. That reduces risk while you schedule the update, but it is not a fix. New attack variants can slip past firewall rules, so updating PHP remains the only complete protection.

Are there temporary fixes if I cannot update PHP today?

PHP published a few settings that reduce exposure, such as setting session.upload_progress.enabled to 0 and lowering post_max_size. You must apply them at the server or pool level, then restart every PHP worker. PHP is clear that these only block known attack paths and do not make a server safe.

How do I know if my server was already compromised?

Look for PHP worker processes that launched shells or downloaded tools, unexplained PHP worker restarts, unfamiliar files, new admin users, and injected spam links. The free php2shell-scanner tool can test whether a host is exposed. If you find signs of compromise, isolate the server, preserve your logs, and report it at ic3.gov as the FBI recommends.

Who is responsible for updating PHP, me or my web host?

It depends on your hosting plan. On managed WordPress hosting, the host usually controls PHP and should patch it, so ask them for written confirmation. On a VPS or dedicated server you manage yourself, updating PHP is your job. If you are not sure which situation you are in, ask your host or developer today.

About Shane Clark

Shane Clark

Shane Clark has 21+ years of experience in web development and digital marketing. He started as a network consultant in 1999 and later became a software engineer. Through ShaneWebGuy, he helps businesses and marketing agencies across the United States with websites, SEO, Google Ads, and AI automation. His interests include travel, family time, and writing practical technology articles.

Website

Shane Clark

About: Shane Clark

Author Information

Bio:

Shane Clark has 21+ years of experience in web development and digital marketing. He started as a network consultant in 1999 and later became a software engineer. Through ShaneWebGuy, he helps businesses and marketing agencies across the United States with websites, SEO, Google Ads, and AI automation. His interests include travel, family time, and writing practical technology articles.


To contact Shane, visit the contact page. For media Inquiries, click here. View all posts by | Website